/**
 * Created by Dalyn on 2017/05-23.
 */
import Relay from "react-relay";

export default class enterpriseTaxRebateDomainListMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { enterpriseTaxRebateList }`;
    }

    getVariables() {
        return {
            argsInput: {
                enid: this.props.enid,
                orderId: this.props.orderId,
                rebateStatus: this.props.rebateStatus,
                sendStatus: this.props.sendStatus,
                pageSize: this.props.pageSize,
                pageNum: this.props.pageNum
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on enterpriseTaxRebateListPayload {
            enterpriseTaxRebateList {
                errorCode
                value
                totalResult
                id
                enterpriseTaxRebateDomainList{
                  orderId
                  contract
                  orderAmount
                  invoiceMoney
                  rebateMoney
                  invoiceNum
                  expressName
                  expressSheet
                  rebateUserName
                  invoiceFileJson
                  traderName
                  rebateStatus
                  orderType
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
                fragment on enterpriseTaxRebateListPayload {
                    enterpriseTaxRebateList {
                        errorCode
                        value
                        totalResult
                        id
                        enterpriseTaxRebateDomainList{
                          orderId
                          contract
                          orderAmount
                          invoiceMoney
                          rebateMoney
                          invoiceNum
                          expressName
                          expressSheet
                          rebateUserName
                          invoiceFileJson
                          traderName
                          rebateStatus
                          orderType
                        }
                    }
                }
            `]
        }];
    }

}
